<!--
 * @Author: taoke
 * @Date: 2022-05-05 09:16:56
 * @LastEditors: taoke
 * @LastEditTime: 2022-05-12 09:32:49
 * @Description: 
 * @FilePath: \yunying-sys-cli4\src\components\partner\relation\index.vue
-->
<template>
  <div>
    <h1 class="con-right-title">
      合伙人邀请记录
    </h1>
    <!--上部搜索条件组件-->
    <topSearch :form-inline="formInline" @toSearch="toSearch"></topSearch>
    <relationTree ref="relationTree"></relationTree>
    <!-- 分页器 -->
    <pageCom
      :searchParams="searchParams"
      :total="total"
      @searchList="searchList"
    ></pageCom>
  </div>
</template>

<script>
import { getShip } from '@/api/partner/relation'
import topSearch from './topSearch'
import relationTree from './components/relationTree'
import { tablePaginationMixin } from '@/mixins/tablePaginationMixin'
export default {
  name: 'relation',
  mixins: [tablePaginationMixin],
  components: {
    topSearch,
    relationTree
  },
  data() {
    return {
      formInline: {
        dpAccount: ''
      }
    }
  },
  mounted() {
    this.searchList()
  },
  methods: {
    searchList() {
      const params = Object.assign(this.formInline, this.searchParams)
      getShip(
        params,
        (response) => {
          this.$refs.relationTree.loadData(response.rows)
          this.total = response.total
        },
        (response) => {
          this.$message({
            message: response.message,
            type: 'warning'
          })
        }
      )
    }
  }
}
</script>
<style scoped></style>
